package com.settlement.system.mapper;

import com.settlement.system.model.entity.common.SinglePage;
import com.settlement.system.model.entity.common.TblOrderAuditBill;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.ResultHandler;

import java.util.List;
import java.util.Map;

/**
 * 订单稽核单据主表 Mapper 接口
 * @author 小船
 * @since 2020-10-21
 */
public interface TblOrderAuditBillMapper extends BaseMapper {
    /**
     * selectBillCount
     * @param params
     * @return
     * @throws Exception
     */
    int selectBillCount(@Param("params") Map<String, Object> params) throws Exception;

    /**
     * selectBillByPage
     * @param page
     * @param params
     * @param orderByField
     * @param orderBy
     * @return
     * @throws Exception
     */
    List<TblOrderAuditBill> selectBillByPage(@Param("page") SinglePage page, @Param("params") Map<String,Object> params,
                                             @Param("orderByField") String orderByField, @Param("orderBy") String orderBy) throws Exception;

    /**
     * updateByBillNo
     * @param bill
     * @throws Exception
     */
    void updateByBillNo(TblOrderAuditBill bill) throws Exception;

    /**
     * getDataBillByHandler
     * @param params
     * @param handler
     */
    void getDataBillByHandler(@Param("params")  Map<String, Object> params, ResultHandler<TblOrderAuditBill> handler);
}

